<?php

namespace app\common\enums\core;

use app\common\enums\BaseEnum;

class UserTypeEnum extends BaseEnum
{
    // 定义常量
    public const SYS_USER = 'sys_user';
    public const ORGANIZATION = 'organization';
    public const TEACHER = 'teacher';
    public const CLIENT = 'client';

    // 定义描述
    public array $description = [
        self::SYS_USER => '平台',
        self::ORGANIZATION => '机构',
        self::TEACHER => '教练',
        self::CLIENT => '学员'
    ];

    public array $url = [
        self::SYS_USER => ["/**"],
        self::ORGANIZATION => ["/o_api/**"],
        self::TEACHER => ['/t_api/**'],
        self::CLIENT => ['/c_api/**']
    ];

    public function getUrl($type)
    {
        return $this->url[$type] ?? [];
    }
}
